package com.rhb.mail.mail.business;
import java.util.List;

import com.rhb.exception.DuplicateException;
import com.rhb.mail.mail.bean.*;

public interface MailBusiness {
	public String create(Mail obj) throws DuplicateException;
	public void update(Mail obj) throws DuplicateException;
	public void erase(Mail obj);
	public void delete(Mail obj);
	public Mail findByPk(String pk);

	public List findByQuery(MailQuery query,int start, int count);
	public int getAllCount_findByQuery(MailQuery query);

	public List findSentMailByQuery(MailQuery query,int start, int count);
	public int getAllCount_findSentMailByQuery(MailQuery query);

	public List findReceivedMailByQuery(MailQuery query,int start, int count);
	public int getAllCount_findReceivedMailByQuery(MailQuery query);

	public List findUnreadMailByQuery(MailQuery query,int start, int count);
	public int getAllCount_findUnreadMailByQuery(MailQuery query);

	public List findDeletedReceivedMailByQuery(MailQuery query,int start, int count);
	public int getAllCount_findDeletedReceivedMailByQuery(MailQuery query);

	public List findDeletedSentMailByQuery(MailQuery query,int start, int count);
	public int getAllCount_findDeletedSentMailByQuery(MailQuery query);

	public List findMailsByFatherPk(String pk);
}
